package lib.bone.nepudata.dao;

import lib.bone.nepudata.domain.entity.NepuPaper;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface NepuPaperDAO extends JpaRepository<NepuPaper,String> {

    List<NepuPaper> findByIdIn(List<String> ids);
    /** 根据词典ID 统计 **/
    Long countByPaperDictId(String dictId);

    List<NepuPaper> findAllByFirstAuthorId(Long userId);

    Boolean existsByPaperDictId(String paperDictId);
    /**
     * 根据论文名称和第一作者查询
     */
    Optional<NepuPaper> findByPaperTitleAndFirstAuthor(String paperTitle,String firstAuthor);


}
